import React from 'react';
import { inject, observer } from 'mobx-react';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

@inject('portalThemeStore')
@observer
class E9Home extends React.Component {
    constructor(props) {
        super(props);
        this.onHomeClick = this.onHomeClick.bind(this);
    }

    render() {
        return (
            <div className="e9header-home" title={getLabel(513044, '首页')} onClick={this.onHomeClick}>
                <div className="e9header-home-icon">
                    <i className="wevicon-home" />
                </div>
            </div>
        );
    }

    onHomeClick() {
        const { portalThemeStore } = this.props;
        portalThemeStore.onLoadMain({ mobxrouteurl: '/main/?theme=ecology9&layout=5' });
    }
}

export default E9Home;
